@extends('admin/index')
@section('name')
    <h1><span class="label label-default"> 编辑 </span></h1>
    <hr>

    <div class="container">
        <div class="row">
            <div class="col-md-4 col-md-offset-4">
                @foreach($res as $list)
                <form class="form-horizontal" action="{{url('editclass_1')}}">
                    <div class="form-group">

                        <label for="inputEmail3" class="col-sm-2 control-label">分类名:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="name" placeholder="name" value="{{$list->name}}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">Pid</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="pid" readonly value="{{$list->pid}}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">path</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="path" value="{{$list->path}}" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword3" class="col-sm-2 control-label">是否隐藏</label>
                        <div class="col-sm-10">
                            @if($list->display == 1 )
                            <label class="radio-inline">
                                <input type="radio" name="display" value="1" checked > no
                            </label>
                                <label class="radio-inline">
                                <input type="radio" name="display" value="2" > yes
                                </label>
                            @else
                            <label class="radio-inline">
                                <input type="radio" name="display" value="1" > no
                            </label>
                                <label class="radio-inline">
                                <input type="radio" name="display" value="2"  checked> yes
                                </label>
                            @endif
                        </div>

                        <input type="hidden" name="id" value="{{$list->id}}">

                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-default">提交</button>
                        </div>
                    </div>
            @endforeach
                </form>
            </div>
        </div>
    </div>

@endsection
